import { defineConfig } from 'vite'
import { join } from "path";
import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: {
      '@': join(__dirname, "src"),
    }
  },
  plugins: [react()],
  server: {
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:18086/',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '/jat-api'),
      },
    }
  },
})
